import '@ant-design-vue/pro-layout/dist/style.css';
import 'ant-design-vue/dist/antd.variable.min.css';

import { createApp } from 'vue';
import { ConfigProvider } from 'ant-design-vue';
import ProLayout, { PageContainer } from '@ant-design-vue/pro-layout';
import router from '@/router/index';
import App from './App.vue';
import { globalStore, key } from '@/store';
import { SESSION_CACHED_LOGIN_USER } from '@/store/login/loginUser';

const sessionCachedLoginUser = sessionStorage.getItem(SESSION_CACHED_LOGIN_USER);
if (sessionCachedLoginUser) {
  globalStore.state.loginUser = JSON.parse(sessionCachedLoginUser);
}
createApp(App).use(globalStore, key).use(router).use(ConfigProvider).use(ProLayout).use(PageContainer).mount('#app');
